package com.higold.cloud.mvp.model

import com.higold.cloud.mvp.model.bean.AchieveBean
import com.higold.cloud.net.RetrofitManager
import com.higold.cloud.rx.scheduler.SchedulerUtils
import io.reactivex.Observable

/**
 *    author : lxz
 *    date   : 2019/8/27 17:21
 *    desc   :
 */

class AchieveModel {

    /**
     * 代理商任务达成情况  type: 0 当月，1累计
     */
    fun requestAchieveList(type: Int): Observable<AchieveBean> {

        return RetrofitManager.service.getAchieveInfo(type, 1)
                .compose(SchedulerUtils.ioToMain())
    }

}